package com.chapter.sample.juc.locks;

public class ReEntryLockDemo {
    static Object objectLock = new Object();
    public static void main(String[] args) {
        m1();
    }
    private static void m1() {
        new Thread(()->{
            synchronized (objectLock){
                System.out.println("外层");
                synchronized (objectLock){
                    System.out.println("中层");
                    synchronized (objectLock){
                        System.out.println("内存");
                    }
                }
            }
        },"t1").start();
    }
}
